<template>
  <div>
    我是子组件:{{ num }}
    <br />
    <el-button @click="btnClick">修改num</el-button>
    <el-button @click="btnClick2">触发父组件的方法</el-button>
  </div>
</template>
<script>
export default {
  props: ['num'],
  methods: {
    btnClick () {
      this.$emit('update:num', this.num + 1)
    },
    btnClick2 (e) {
      this.$emit('xxx', e)
    }
  }
}
</script>
<style></style>
